package net.contrend.material.form;

import java.util.Date;

import net.contrend.util.StringUtils;

import org.apache.struts.action.ActionForm;

/**
 * <p>Copyright @ 2009 www.contrend.net</p>
 * <p>All right reserved. </p>
 * <p>项目名称			： 进销存管理系统 </p>
 * <p>JDK使用版本号		： jdk6.0 </P>
 * <p>描述				： 原料 Form </p>
 * @版本					： 1.0.0 
 * @author				： 谢庚才
 *
 * <p>修改历史 </p>
 * <p>修改时间            修改人员    修改内容 </p>
 * <p>Dec 11, 2009       谢庚才     新建 </p>
 */
public class MaterialForm extends ActionForm {

	private static final long serialVersionUID = -7584606745828751674L;
	/** 材料Id */
	private String materialId;
	/** 原料类别Id */
	private String mtId;
	/** 原料代码 */
	private String code;
	/** 原料名称 */
	private String name;
	/** 规格 */
	private String specification;
	/** 单位 */
	private String unit;
	/** 安全下限 */
	private Double minQuantity;
	/** 安全上限 */
	private Double maxQuantiy;
	private Date createDate;
	private String status;
	
	private MaterialTypeForm materialType = new MaterialTypeForm();
	
	public String getMaterialId() {
		return materialId;
	}
	public void setMaterialId(String materialId) {
		this.materialId = materialId;
	}
	public String getMtId() {
		if (StringUtils.isEmpty(this.mtId) && StringUtils.isNotEmpty(this.materialType.getMtId())) {
			this.mtId = this.materialType.getMtId();
		}
		return mtId;
	}
	public void setMtId(String mtId) {
		this.mtId = mtId;
	}
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getSpecification() {
		return specification;
	}
	public void setSpecification(String specification) {
		this.specification = specification;
	}
	public String getUnit() {
		return unit;
	}
	public void setUnit(String unit) {
		this.unit = unit;
	}
	public Double getMinQuantity() {
		return minQuantity;
	}
	public void setMinQuantity(Double minQuantity) {
		this.minQuantity = minQuantity;
	}
	public Double getMaxQuantiy() {
		return maxQuantiy;
	}
	public void setMaxQuantiy(Double maxQuantiy) {
		this.maxQuantiy = maxQuantiy;
	}
	public Date getCreateDate() {
		return createDate;
	}
	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}
	public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	public MaterialTypeForm getMaterialType() {
		return materialType;
	}
	public void setMaterialType(MaterialTypeForm materialType) {
		this.materialType = materialType;
	}

}
